<template>
  <div>
    <!-- 头部新的导航栏部分 -->
    <div class="order_header">
      <div class="order_header_img">
        <img src="/image/logo.png" alt="" />
      </div>
      <div class="order_header_content">

          <template v-if="Uname!=null" >
            <a href="javascript:;" id="color1">欢迎{{Uname}}</a>
            <span>|</span>
            <a href="javascript:;"  @click="UpdateName(null)" id="color2">退出</a>
            <span>|</span>
          </template>

        <a href="javascript:;" @click="goMydetail()">我的SN</a>
        <span>|</span>
        <a href="javascript:;">帮助中心</a>
        <span>|</span>
        <a href="javascript:;" class="active">888-8668-888</a>
      </div>
      
    </div>
  </div>
</template>

<script>
import {mapState,mapMutations} from 'vuex'
  export default {
    data() {
      return {
      }
    },
    methods: {
      ...mapMutations(['UpdateName']),
        // 测试token
    testToken(){
      this.axios.get('/car/product')
      .then(res => {
        // console.log(res)
      })
      },
      goMydetail(){
        this.$router.push('/mydetail')
      }
    },
    computed: {
      ...mapState(['Uname'])
    },
  }
</script>
<style src="../assets/css/orderheader.css" scoped>

</style>
<style lang="scss" scoped>

</style>